# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=python-btrees
pkgver=4.11.3
pkgrel=2
pkgdesc='A fancy and practical functional tools'
arch=('loong64' 'x86_64')
license=('ZPL')
url='https://github.com/zopefoundation/btrees'
depends=('python-persistent' 'python-zope-interface')
makedepends=('python-setuptools')
checkdepends=('python-transaction' 'python-zope-testrunner')
source=("$pkgname-$pkgver.tar.gz::https://github.com/zopefoundation/btrees/archive/$pkgver.tar.gz")
sha512sums=('e184f47db4ba63938cd8e6ddcc7aa452447e4324e64e8e92b874e3d72736c6371a0ba6c82fdc5a94046ac7aee1b028ca43de4eaea9a11394040868c8c89c9974')

build() {
  cd BTrees-$pkgver
  python setup.py build
}

check() {
  cd BTrees-$pkgver
  PYTHONPATH="$PWD/build/lib.linux-$CARCH-cpython-311" python -m zope.testrunner --test-path=src
}

package() {
  cd BTrees-$pkgver
  python setup.py install --root="$pkgdir" --optimize=1
}

# vim:set ts=2 sw=2 et:
